<template>
	<view class="page flex-col">
		<image @click="listenerActionSheet" class="shareImg" src="../../static/com/icon_fx.png" mode=""></image>
		<view class="group_3 flex-col">
			<view class="group_4 flex-col">
				<swiper :indicator-dots="false" indicator-active-color="#fff" :circular='true' :autoplay="true"
					:interval="3000" :duration="1000">
					<swiper-item v-for="(items,index) in pageData.sliderImage" :key="index">
						<image :src="items" mode=""></image>

					</swiper-item>

				</swiper>
				<!-- <view class="box_1 flex-row">
					<text class="text_6">1</text>
					<image class="image_6" referrerpolicy="no-referrer"
						src="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng5bcad5a00b017004fd7da64038e6364a55a79dc8ecb0c591c4f4b988a42663a0" />
					<text class="text_7">6</text>
				</view> -->
			</view>
		</view>
		<view class="group_5 flex-col">
			<text class="text_8">{{pageData.hospitalName}}</text>
			<view class="group_6 flex-row ">
				<view class="text-wrapper_1 bgb flex-col" v-for="(item,index) in pageData.tags" :key="index">
					<text class="text_9 bc">{{item}}</text>
				</view>
				<!-- 	<view class="text-wrapper_2 flex-col">
					<text class="text_10">三甲</text>
				</view>
				<view class="text-wrapper_3 flex-col">
					<text class="text_11">重点</text>
				</view> -->
			</view>
			<text class="text_12">
				医院介绍：{{pageData.hospitalDesc}}
			</text>
		</view>
		<view class="group_7 flex-col">
			<view class="text-group_1 flex-col">
				<text class="text_13">医院电话</text>
				<text class="text_14">{{pageData.hospitalPhone}}</text>
			</view>
			<view class="text-group_1 flex-col">
				<text class="text_13">医院地址</text>
				<text class="text_14">{{pageData.address}}</text>
			</view>
			
			<view class="box_2 ">
				<map style="width: 690rpx; height: 340rpx;margin: 0 auto;" :latitude="pageData.latitude"
					:longitude="pageData.longitude" :markers="covers">
				</map>

			</view>
			<view class="box_3 ">
				<view class=" flex-row justify-between">
					<view class="text_17">医生列表</view>
					<view class="image-text_1" @click="goPage('/pagesA/hospital/doctorList?isHot=true')">
						<text class="text-group_2">查看全部</text>
						<image class="image_7" src="../../static/com/icon_more.png" mode=""></image>
					</view>
				</view>

				<doctorList :listTitle="listTitle" :goodsList="pageData.doctorList" :imgWidth="192" :imgHeight="152">
				</doctorList>
			</view>

		</view>
		<uni-popup ref="safeguardPup" type="bottom">
		
			<view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''">
		
				<button class="item" open-type="share" hover-class='none' @click="goFriend">
					<view class="iconfont icon-weixin3"></view>
					<view class="">发送给朋友</view>
				</button>
		
				<button class="item" hover-class='none' @tap="sharePoster">
					<view class="iconfont icon-haibao"></view>
					<view class="">生成海报</view>
				</button>
			</view>
		</uni-popup>
		<qrcode-poster @saveImgeOK="saveImgeOK" ref="poster" :title="pageData.hospitalName" :des="pageData.hospitalDesc"
			:headerImg="pageData.sliderImage[0]" subTitle=' '></qrcode-poster>
<home></home>

	</view>
</template>
<script>
	import QrcodePoster from '@/components/com/poster.vue'
	import home from '@/components/home/index.vue'
	import {
		getHospitalDetail
	} from '@/api/togeterRich/family.js'
	import doctorList from '@/pagesA/hospital/com/components/doctorHeadList'
	export default {
		components: {
			home,
			doctorList,
			QrcodePoster
		},
		data() {
			return {
				pageData: {},
				goodsList: [{
					id: 1,
					name: '大甜梨',
					descr: '又大又甜又脆巨好吃',
					icon: '/pagesB/static/fruit/img1.png'
				}, {
					id: 2,
					name: '猕猴桃',
					descr: '口感甜酸、可口',
					icon: '/pagesB/static/fruit/img2.png'
				}, {
					id: 3,
					name: '樱桃',
					descr: '又大又甜水还多',
					icon: '/pagesB/static/fruit/img3.png'
				}, {
					id: 4,
					name: '牛油果',
					descr: '果肉柔软、细腻',
					icon: '/pagesB/static/fruit/img4.png'
				}, {
					id: 5,
					name: '提子',
					descr: '又大又甜水还多',
					icon: '/pagesB/static/fruit/img5.png'
				}, {
					id: 6,
					name: '奶油草莓',
					descr: '酸酸甜甜很好吃',
					icon: '/pagesB/static/fruit/img6.png'
				}],
				id: 0, // 使用 marker点击事件 需要填写id
				title: 'map',
				latitude: 39.909,
				longitude: 116.39742,
				covers: [{
					latitude: 39.909,
					longitude: 116.39742,
					iconPath: './../static/logo.png'
				}, {
					latitude: 39.90,
					longitude: 116.39,
					iconPath: './../static/logo.png'
				}],
				constants: {},
			};
		},
		onLoad() {
			this.init()
		},
		methods: {
			saveImgeOK(){
				this.$refs.safeguardPup.close()
				// this.posters = false;
			},
			sharePoster() {
				//获取带参数二维码并传递
				this.is_show_model = false
				this.$refs.poster.showCanvas()
			},
			listenerActionSheet: function() {
				if (this.isLogin === false) {
					toLogin();
				} else {
					// #ifdef H5
					if (!this.imgTop) this.getImageBase64(this.storeImage);
					if (this.$wechat.isWeixin() === true) {
						this.weixinStatus = true;
					}
					// #endif
					this.$refs.safeguardPup.open()
					// this.posters = true;
			
				}
			},
			init() {
				getHospitalDetail().then(res => {
					this.pageData = res.data
					console.log(res, 'sdss')
				})
			},
			goPage(url) {
				uni.navigateTo({
					url
				})
			}
		},

	};
</script>
<style lang="scss" scoped>
	@import 'com/css/info.css';
	/* @import 'com/index.css'; */
	@import '@/com/css/common.css';
	.bc{
			color: $maincolor !important;
		}
		.bgb{
			border: 2rpx solid $maincolor !important;
		}
		.bb{
			background: $maincolor;
		}
</style>